// EBook.java
package Object.work.model;

public class EBook extends Book {
    private String format;
    private double fileSize; // in MB

    public EBook(String id, String title, int year, String author, String isbn, String format, double fileSize) {
        super(id, title, year, author, isbn);
        this.format = format;
        this.fileSize = fileSize;
    }

    @Override
    public String getItemType() {
        return "E-Book";
    }

    // Getters
    public String getFormat() {
        return format;
    }

    public double getFileSize() {
        return fileSize;
    }

    @Override
    public String toString() {
        return super.toString() + ", Format: " + format + ", File Size: " + fileSize + "MB";
    }
}